Random.uniform   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
1
export class Random {
2
    uniform(max, min) {
3
        return Math.random() * (max - min) + min;
4
    }
5
6
    int(max, min) {
7
        return Math.floor(this.uniform(max, min));
8
    }
9
}
10
11
export const random = new Random();
12